fn main() {
    let a = 200;
    println!("a:{}", a);
    let tup = (1, "2", false);
    println!("tup:{} {} {}", tup.0, tup.1, tup.2);

    let mut tup2 = (1, "123", false);
    println!("tup2:{} {} {}", tup2.0, tup2.1, tup2.2);
    tup2.1 = "new123";
    println!("tup2:{} {} {}", tup2.0, tup2.1, tup2.2);

    let tup3 = ();
    println!("tup3:{:?}", tup3);

    let mut arr = [11, 12, 14];
    arr[0] = 999;
    println!("arr len {} first element is {}", arr.len(), arr[0]);
    for element in arr {
        println!("element {}", element);
    }

    let ar = [12; 5];
    for element in ar {
        println!("{element}")
    }

    let string_item = "aa";
    println!("string_item:{string_item}");
    let string_item_copy = string_item;
    println!("string_item_copy:{string_item_copy}");

    println!("string_item:{string_item}");
    println!("string_item_copy:{string_item_copy}");

    let string_item2 = String::from("aa");
    println!("string_item2:{}", string_item2);
    let string_item2_copy = string_item2;
    println!("string_item2_copy:{}", string_item2_copy);
    // string_item2 已经销毁 ownership 移交所有权
    // println!("string_item2:{}", string_item2);
    println!("string_item2_copy:{}", string_item2_copy);
}
